﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using MongoDB.Bson;
using MongoDB.Bson.IO;
using MongoDB.Driver;
using Xwltz.Framework.Cloud;
using Xwltz.Framework.Database;
using Xwltz.Framework.Framework;
using Xwltz.Framework.Helper;
using Timer = System.Timers.Timer;

namespace Xwltz.Framework.Test
{
    public class Program
    {
        public static void Main(string[] args)
        {
            #region 测试代码 1

            //var str1 = CryptoService.MD5Encrypt("123456",true);
            //Console.WriteLine(str1);

            //var str2 = CryptoService.MD5Encrypt("123456",false);
            //Console.WriteLine(str2);
            //var str3 = CryptoService.HMACMD5Encrypt("123456", AppContext.Key);
            //Console.WriteLine(str3);

            //var str4 = CryptoService.SHA1Encrypt("123456");
            //Console.WriteLine(str4);
            //var str5 = CryptoService.HMACSHA1Encrypt("123456", AppContext.Key);
            //Console.WriteLine(str5);

            //var str6 = CryptoService.SHA256Encrypt("123456");
            //Console.WriteLine(str6);
            //var str7 = CryptoService.HMACSHA256Encrypt("123456", AppContext.Key);
            //Console.WriteLine(str7);

            //var str8 = CryptoService.SHA384Encrypt("123456");
            //Console.WriteLine(str8);
            //var str9 = CryptoService.HMACSHA384Encrypt("123456", AppContext.Key);
            //Console.WriteLine(str9);

            //var str10 = CryptoService.SHA512Encrypt("123456");
            //Console.WriteLine(str10);
            //var str11 = CryptoService.HMACSHA512Encrypt("123456", AppContext.Key);
            //Console.WriteLine(str11);

            //var value1 = CryptoService.DESEncrypt("xw2lt", AppContext.Key);
            //Console.WriteLine(value1);
            //var value2 = CryptoService.DESDecrypt(value1, AppContext.Key);
            //Console.WriteLine(value2);

            //var str12 = CryptoService.AESEncrypt("123456", AppContext.Key);
            //Console.WriteLine(str12);
            //var str13 = CryptoService.AESDecrypt(str12, AppContext.Key);
            //Console.WriteLine(str13);

            //var str14 = CryptoService.RSAEncrypt("123456", AppContext.Key);
            //Console.WriteLine(str14);
            //var str15 = CryptoService.RSADecrypt(str14, AppContext.Key);
            //Console.WriteLine(str15);

            //var login = new LoginService(FrameworkConfigs.UserName, FrameworkConfigs.Password, FrameworkConfigs.Token);
            //login.PreLgoin();
            //login.DoLogin();

            //var report = new ReportService(login);
            //var json = report.GetSiteList();

            //Console.WriteLine(json);

            //Console.ReadLine();

            //var str = "wstx15963".ToMd5S16();
            //Console.WriteLine(str);

            //Console.ReadLine();

            //var data = "Hello, this is a secret message!";
            //var msg = data.ToRsaEncrypt("wstx");
            //Console.WriteLine(msg);

            //var decmsg = "+Yrf2KE3D1VsWnvBdH+34WeNJkDoG0hmQDo5Ns7uMgoKSOEIGTfffXCEKWy6sAmg";
            //var str12 = CryptoService.AESEncrypt("我真是太牛逼了!", "wstx");
            //Console.WriteLine(str12);
            //var str13 = CryptoService.AESDecrypt(decmsg, "wstx");
            //Console.WriteLine(str13);

            //AliSms.SmsSend();

            //AliSms.QuerySendDetails();

            //var user = new Users()
            //{
            //    Id = 9,
            //    UserName = "zzz1",
            //    Password = "fff2",
            //    UserPass = ""
            //};

            //try
            //{
            //    //var flag = SimpleClient.UpdateModel(user);
            //    //Console.WriteLine(flag);

            //    var str = SimpleClient.GetListPage<Users>(out var row, "id asc");

            //    Console.WriteLine(row);
            //}
            //catch (Exception ex)
            //{
            //    Console.WriteLine(ex);
            //}

            //var obje = OperatorProvider<object>.Provider;

            //Console.WriteLine(23%8);

            //string[] arr = { "小米", "徐州", "高清", "投影仪", "代理" };

            ////求排列
            //var lstPermutation = PermutationAndCombination<string>.GetPermutation(arr, 5);
            //Console.WriteLine(lstPermutation);
            ////求组合
            //var lstCombination = PermutationAndCombination<string>.GetCombination(arr, 5);
            //Console.WriteLine(lstCombination);

            //var i = WebHelper.GetCache("test");
            //var s = WebHelper.GetCache("xwltz", () => 12*14);
            //WebHelper.RemoveCache(s => s.EndsWith("_xwltz"));

            #endregion

            #region 定时器测试代码

            //var timer = new MyTimer();
            //timer.Start();

            //Thread.Sleep(5000);

            //timer.Stop();

            //Thread.Sleep(3000);

            //timer.Start();

            //Console.ReadLine();

            #endregion

            #region 测试代码 2

            //var msg = Encoding.UTF8.GetBytes("我的测试");
            //var socket = new SocketMessage(1, msg);
            //var parser = new ParserMessage();
            //var bytes = parser.Encode(socket);
            //var messagelist = parser.GetDcAppMess(bytes, 24);
            //var message = Encoding.UTF8.GetString(messagelist[0].MessageBuffer);
            //Console.WriteLine(message);
            //Console.ReadLine();


            //Dictionary<string,string> values = new Dictionary<string, string>();

            //values.Add("k", "网站优化");
            //var html = HttpHelper.HttpPost("http://romou.com/seo.asp", values, "application/x-www-form-urlencoded");
            //Console.WriteLine(html);

            //var keyWordUrl = "https://www.keywordscn.com/result.asp?the_Type=1&keyword=徐州网站建设";
            //var html = HttpHelper.HttpGet(keyWordUrl, null, "application/json, text/javascript");
            //Console.WriteLine(html);

            //var product = new { Name = "", Price = 0.01 };

            //var price = (product.Price * 100).ToInt();

            //Console.WriteLine(price);


            //var dict = new Dictionary<string, string>();
            //for (int i = 0; i < 50000; i++)
            //{
            //    Task.Run(() =>
            //    {
            //        var number = CommonBase.CreateOrderNo();
            //        dict.Add(number, number);
            //        Console.WriteLine(number);
            //    });
            //    Thread.Sleep(1000);
            //}

            //var redis = new RedisHelper("127.0.0.1");
            //redis.SetString("xwltz","19931223");
            //var str = redis.GetString("xwltz");


            //头条引擎 接入
            //var keyWordUrl = $"https://ad.toutiao.com/track/activate/?callback=EOf2mcbI8_UCGIygnebQj_UCKIvQpYTirvUC&event_type=3";
            //var html = HttpHelper.HttpGet(keyWordUrl, null, "application/json, text/javascript");
            //Console.WriteLine(html);


            //var keyWordUrl = $"http://index.chinaz.com/index/%E7%BD%91%E7%AB%99%E4%BC%98%E5%8C%96/";
            //var html = HttpHelper.HttpGet(keyWordUrl);
            ////var html = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html>\r\n<head>\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n    <title>徐州网站建设近30天搜索趋势 - 关键词全网指数查询</title>\r\n    <meta name=\"keywords\" content=\"百度指数,360指数,移动百度指数,神马指数,移动360指数,全网指数,关键词指数查询,关键词指数批量查询,全网指数查询\" />\r\n    <meta name=\"description\" content=\"站长全网指数查询是以各大搜索引擎海量网民搜索行为数据为基础的数据分享平台。在这里，你可以研究关键词在各大搜索引擎的趋势、洞察网民需求变化、监测媒体舆情趋势、定位数字消费者特征；还可以从行业的角度，分析市场特点。\" />\r\n\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"//csstools.chinaz.com/common/styles/all-base.css?v=201902\">\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"//csstools.chinaz.com/common/styles/publicstyle.css?v=201902\">\r\n    <script type=\"text/javascript\" src=\"//csstools.chinaz.com/common/js/jquery-1.11.3.min.js\"></script>\r\n    <script type=\"text/javascript\" src=\"//csstools.chinaz.com/common/js/jq-public.js?v=201607\"></script>\r\n    <script type=\"text/javascript\" src=\"//csstools.chinaz.com/common/js/mobilepage.js?v=201812\"></script>\r\n\r\n    <!--[if IE 6]>\r\n    <script type=\"text/javascript\" src=\"js/DD_belatedPNG.js\"></script>\r\n    <script>    DD_belatedPNG.fix('*');</script>\r\n    <![ENDIF]-->\r\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"//csstools.chinaz.com/index/styles/keywordstyle.css?v=201802\">\r\n    <script src=\"//csstools.chinaz.com/tools/js/charts/highcharts/highcharts.js?v=201903\"></script>\r\n    <script src=\"/Scripts/handlebars-v4.0.12.js?v=201903\"></script>\r\n    <script src=\"/Scripts/index.utils.js?v=201903\"></script>\r\n    <script src=\"/Scripts/index.js?v=201903\"></script>\r\n\r\n</head>\r\n<body>\r\n    <!--top-public-begin-->\r\n    <div class=\"ww100\">\r\n        <!--ToolTop-begin-->\r\n        <div class=\"ToolTop bor-b1s clearfix\">\r\n            <div class=\"wrapper02 SimSun\">\r\n                <ul class=\"TnavList pr zI52\" id=\"menu\">\r\n                    <li class=\"def\"><a href=\"//www.chinaz.com\" class=\"def\"><span>站长之家</span></a></li>\r\n                    <li class=\"tdrap\">\r\n                        <a href=\"//tool.chinaz.com\" target=\"_blank\"><span>站长工具</span><i class=\"corner icon\"></i></a>\r\n                        <p class=\"tdrap-on\">\r\n                            <a href=\"//alexa.chinaz.com\" target=\"_blank\">ALEXA排名查询</a>\r\n                            <a href=\"//rank.chinaz.com\" target=\"_blank\">百度权重查询</a>\r\n                            <a href=\"//seo.chinaz.com\" target=\"_blank\">SEO概况查询</a>\r\n                            <a href=\"//link.chinaz.com\" target=\"_blank\">友情链接查询</a>\r\n                            <a href=\"//pr.chinaz.com\" target=\"_blank\">Google PR查询</a>\r\n                            <a href=\"//whois.chinaz.com\" target=\"_blank\">Whois信息查询</a>\r\n                            <a href=\"//icp.chinaz.com\" target=\"_blank\">域名备案查询</a>\r\n                        </p>\r\n                    </li>\r\n                    <li class=\"tdrap\">\r\n                        <a href=\"http://sc.chinaz.com\" target=\"_blank\"><span>站长素材</span><i class=\"corner icon\"></i></a>\r\n                        <p class=\"tdrap-on\">\r\n                            <a href=\"http://font.chinaz.com/\" target=\"_blank\">字体下载</a>\r\n                            <a href=\"http://desk.chinaz.com/\" target=\"_blank\">高清壁纸</a>\r\n                            <a href=\"http://sc.chinaz.com/jianli/\" target=\"_blank\">简历模板</a>\r\n                            <a href=\"http://sc.chinaz.com/tupian/\" target=\"_blank\">高清图片</a>\r\n                            <a href=\"http://sc.chinaz.com/shiliang/\" target=\"_blank\">矢量素材</a>\r\n                            <a href=\"http://sc.chinaz.com/ppt/\" target=\"_blank\">PPT模板</a>\r\n                            <a href=\"http://sc.chinaz.com/psd/\" target=\"_blank\">PSD素材</a>\r\n                        </p>\r\n                    </li>\r\n                    <li class=\"def\"><a href=\"http://down.chinaz.com\" target=\"_blank\"><span>源码下载</span></a></li>\r\n                    <li class=\"tdrap\">\r\n                        <a href=\"//top.chinaz.com\" target=\"_blank\"><span>网站排行</span><i class=\"corner icon\"></i></a>\r\n                        <p class=\"tdrap-on\">\r\n                            <a href=\"//top.chinaz.com/hangye/\" target=\"_blank\">行业网站排名</a>\r\n                            <a href=\"//top.chinaz.com/diqu/\" target=\"_blank\">地区网站排名</a>\r\n                        </p>\r\n                    </li>\r\n                    <li class=\"def\"><a href=\"//aso.chinaz.com/\" target=\"_blank\"><span>APP榜单</span></a></li>\r\n                    <li class=\"tdrap\">\r\n                        <a href=\"javascript:\" class=\"Tnone\"><span>手机版</span><i class=\"corner icon\"></i></a>\r\n                        <p class=\"tdrap-on\"><img src=\"//csstools.chinaz.com/tools/images/mtool.chinaz.com.qrcode.png\"></p>\r\n                    </li>\r\n                    <li class=\"def\"><a href=\"//zj.chinaz.com/\" target=\"_blank\"><span>SEO中介</span></a></li>\r\n                    <li class=\"def\"><a href=\"//tool.chinaz.com/soft\" target=\"_blank\" class=\"sNew\"><span>SEO工具包</span></a></li>\r\n                </ul>\r\n                <div class=\"fr TrigW\" id=\"chinaz_topbar\"></div>\r\n            </div>\r\n        </div>\r\n        <!--ToolTop-end-->\r\n        <!--ToolHead-begin-->\r\n        <div class=\"ToolHead\">\r\n            <div class=\"wrapper clearfix\">\r\n                <h1 class=\"ToolLogo fl\">\r\n                    <a href=\"/\"><img src=\"//csstools.chinaz.com/index/images/index-logo.png\"></a>\r\n                </h1>\r\n                <div class=\"fr topImg_rig ml10\" id=\"topImg_rig\"></div>\r\n                <div class=\"fr topTsCentRank\">\r\n                    <script src=\"//stats.chinaz.com/gj_g/rank_640.js\" type=\"text/javascript\"></script>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <!--ToolHead-end-->\r\n        <!--ToolNavbar-begin-->\r\n        <div class=\"ToolNavbar\" id=\"ToolNav\">\r\n            <div class=\"navbar-bg\">\r\n                <div class=\"navbar-bg-top\">\r\n                    <div class=\"navbar-content pr\">\r\n                        <div class=\"navbar-content-box\">\r\n                            <div class=\"wrapper02 clearfix\" id=\"Navbar\">\r\n                                <ul class=\"w114\">\r\n                                    <li class=\"dt\"><a href=\"//tool.chinaz.com\">首页</a></li>\r\n                                    <li class=\"dd\">\r\n                                        <a href=\"//api.chinaz.com/\" target=\"_blank\">站长数据API</a>\r\n                                        <a href=\"//aso.chinaz.com/\" target=\"_blank\">APP榜单监控</a>\r\n                                        <a href=\"//zj.chinaz.com/\" target=\"_blank\">SEO优化中介</a>\r\n                                        <a href=\"//cdn.chinaz.com\" target=\"_blank\">CDN云观测</a>\r\n                                    </li>\r\n                                </ul>\r\n                                <ul class=\"odd\">\r\n                                    <li class=\"dt\"><a href=\"http://ip.tool.chinaz.com\">域名/IP类</a></li>\r\n                                    <li class=\"dd\">\r\n                                        <a href=\"//tool.chinaz.com/DomainDel/\" target=\"_blank\">域名到期查询</a>\r\n                                        <a href=\"//del.chinaz.com\" target=\"_blank\">过期域名查询</a>\r\n                                        <a href=\"//whois.chinaz.com\" target=\"_blank\">WHOIS查询</a>\r\n                                        <a href=\"http://ip.tool.chinaz.com\" target=\"_blank\">IP 查询</a>\r\n                                        <a href=\"http://ip.tool.chinaz.com/Same/\" target=\"_blank\">同IP网站查询</a>\r\n                                        <a href=\"//tool.chinaz.com/dns/\" target=\"_blank\">DNS查询</a>\r\n                                    </li>\r\n                                </ul>\r\n                                <ul class=\"both\">\r\n                                    <li class=\"dt\"><a href=\"//icp.chinaz.com\">网站信息查询</a></li>\r\n                                    <li class=\"dd\">\r\n                                        <a href=\"//alexa.chinaz.com\" target=\"_blank\" class=\"rig\">Alexa排名</a>\r\n                                        <a href=\"//icp.chinaz.com\" target=\"_blank\">网站备案查询</a>\r\n                                        <a href=\"//tool.chinaz.com/webdetect/\" target=\"_blank\" class=\"rig\">网页检测</a>\r\n                                        <a href=\"//tool.chinaz.com/pagestatus/\" target=\"_blank\">HTTP状态查询</a>\r\n                                        <a href=\"//tool.chinaz.com/Tools/pagecode.aspx\" target=\"_blank\" class=\"rig\">查看网页源代码</a>\r\n                                        <a href=\"//tool.chinaz.com/tools/robot.aspx\" target=\"_blank\">机器人模拟抓取</a>\r\n                                        <a href=\"//tool.chinaz.com/robots/\" target=\"_blank\" class=\"rig\">robots.txt生成</a>\r\n                                        <a href=\"//mobile.chinaz.com/fiturl_baidu.html\" target=\"_blank\">移动适配生成</a>\r\n                                        <a href=\"//tool.chinaz.com/sitespeed\" target=\"_blank\" class=\"rig\">网站速度测试</a>\r\n                                        <a href=\"//ping.chinaz.com/\" target=\"_blank\">ping测试</a>\r\n                                        <a href=\"//mobile.chinaz.com/\" target=\"_blank\" class=\"rig\">Wap适配</a>\r\n                                        <a href=\"//tool.chinaz.com/Gzips/\" target=\"_blank\">网站GZIP压缩</a>\r\n                                    </li>\r\n                                </ul>\r\n                                <ul class=\"both\">\r\n                                    <li class=\"dt\"><a href=\"//seo.chinaz.com\">SEO查询</a></li>\r\n                                    <li class=\"dd\">\r\n                                        <a href=\"//seo.chinaz.com\" target=\"_blank\" class=\"rig\">SEO综合查询</a>\r\n                                        <a href=\"http://wapseo.chinaz.com\" target=\"_blank\">移动SEO查询</a>\r\n                                        <a href=\"//link.chinaz.com\" target=\"_blank\" class=\"rig\">友情链接检测</a>\r\n                                        <a href=\"//outlink.chinaz.com\" target=\"_blank\">反链查询</a>\r\n                                        <a href=\"//tool.chinaz.com/shoulu/\" target=\"_blank\" class=\"rig\">收录查询</a>\r\n                                        <a href=\"//tool.chinaz.com/baidu/metadig.aspx\" target=\"_blank\">META信息挖掘</a>\r\n                                        <a href=\"//pr.chinaz.com\" target=\"_blank\" class=\"rig\">PR查询</a>\r\n                                        <a href=\"//tool.chinaz.com/kws/\" target=\"_blank\">关键词排名查询</a>\r\n                                        <a href=\"//tool.chinaz.com/baidu/words.aspx\" target=\"_blank\" class=\"rig\">关键词挖掘</a>\r\n                                        <a href=\"//tool.chinaz.com/kwevaluate\" target=\"_blank\">关键词优化分析</a>\r\n                                        <a href=\"//tool.chinaz.com/websitepk.aspx\" target=\"_blank\" class=\"rig\">竞争网站分析</a>\r\n                                        <a href=\"//tool.chinaz.com/seocheck\" target=\"_blank\">SEO优化建议</a>\r\n                                    </li>\r\n                                </ul>\r\n                                <ul class=\"odd\">\r\n                                    <li class=\"dt pr\"><a href=\"//rank.chinaz.com\">权重查询</a><span class=\"ico-navNew pa\"></span></li>\r\n                                    <li class=\"dd\">\r\n                                        <a href=\"//rank.chinaz.com\" target=\"_blank\">百度权重查询</a>\r\n                                        <a href=\"//rank.chinaz.com/baidumobile\" target=\"_blank\">百度移动权重查询</a>\r\n                                        <a href=\"//rank.chinaz.com/sorank\" target=\"_blank\">360权重查询</a>\r\n                                        <a href=\"//rank.chinaz.com/rank360\" target=\"_blank\">360移动权重查询</a>\r\n                                        <a href=\"//index.chinaz.com/bid\" target=\"_blank\">关键词竞价创意查询</a>\r\n                                        <a href=\"//index.chinaz.com\" target=\"_blank\">关键词指数</a>\r\n                                    </li>\r\n                                </ul>\r\n                                <ul class=\"odd\">\r\n                                    <li class=\"dt\"><a href=\"//tool.chinaz.com/map.aspx#fz\">辅助工具</a></li>\r\n                                    <li class=\"dd\">\r\n                                        <a href=\"//tool.chinaz.com/Tools/textencrypt.aspx\" target=\"_blank\">加密解密</a>\r\n                                        <a href=\"//tool.chinaz.com/Tools/Unicode.aspx\" target=\"_blank\">编码转换</a>\r\n                                        <a href=\"//tool.chinaz.com/Tools/JsCodeConfusion.aspx\" target=\"_blank\">压缩格式化</a>\r\n                                        <a href=\"//tool.chinaz.com/Tools/onlinecolor.aspx\" target=\"_blank\">配色工具</a>\r\n                                        <a href=\"//tool.chinaz.com/Tools/unixtime.aspx\" target=\"_blank\">Unix时间戳</a>\r\n                                        <a href=\"//tool.chinaz.com/Tracert/\" target=\"_blank\">路由器追踪</a>\r\n                                    </li>\r\n                                </ul>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <!--ToolNavbar-end-->\r\n    <div class=\"wrapper02 ptb10 ToolsWrapIM clearfix\" id=\"navAfter\"></div>\r\n    <div class=\"Map-navbar wrapper clearfix\">\r\n        <div class=\"Mnav-left fl\">\r\n            当前位置： <a href=\"//tool.chinaz.com/\">站长工具</a> > <a href=\"/\">关键词全网指数</a>\r\n        </div>\r\n        <div class=\"Mnav-right02 fr\" id=\"loc\">\r\n        </div>\r\n    </div>\r\n    <!--top-public-end-->\r\n    <div class=\"wrapper mt10 pr\">\r\n        <a href=\"//my.chinaz.com/toolvip/vip\" target=\"_blank\" class=\"viptag\"></a>\r\n        <!--PingSearch-begin-->\r\n        <div class=\"publicSearch w680 auto\">\r\n            <form autocomplete=\"off\" method=\"get\" action=\"/\">\r\n                <div class=\"search-write-wrap clearfix pr zI1\">\r\n                    <div class=\"search-write-left pr\">\r\n                        <input type=\"text\" value=\"徐州网站建设\" class=\"search-write-cont w465 WrapHid\" id=\"txtKw\" words=\"true\" isnull=\"false\">\r\n                        <a href=\"javascript:\" title=\"清空\" class=\"quickdelete _CentHid\"></a>\r\n                        <b class=\"search-hint CentHid\" style=\"display: block;\">请输入关键词</b>\r\n                        <input type=\"hidden\" value=\"徐州网站建设\" id=\"keyword\" name=\"words\" />\r\n                    </div>\r\n                    <div class=\"search-write-right\">\r\n                        <input class=\"search-write-btn\" type=\"submit\" value=\"全网指数\" id=\"btn-submit\">\r\n                    </div>\r\n                    <a href=\"/bid/\" target=\"_self\" class=\"SeaBtnCut ml10\">竞价查询</a>\r\n                    \r\n                    <div class=\"BomreWa\" id=\"history-box\">\r\n                        <div class=\"BomreWrap\">\r\n                            <a class=\"IMSearBtn ml10 lh40 tdbone\" id=\"selecthis\" href=\"javascript:\">查询记录<i class=\"icon corner\"></i></a>\r\n                            <div class=\"Bomrecord\" id=\"selecthis-box\" style=\"left: auto; right: 20px; display: none;\">\r\n                                <div class=\"BomCor-arrow\" style=\"left: auto; right: 6px;\">\r\n                                    <em>◆</em><i>◆</i>\r\n                                </div>\r\n                                <div class=\"BomreList\">\r\n                                    <div class=\"BorWrapa tc\">\r\n                                        <img src=\"//csstools.chinaz.com/index/images/public/spinner.gif\" class=\"mt10\">\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <p class=\"col-hint lh30 pl5\">\r\n                    注：多个关键词用逗号隔开,最多5个关键词。查询更多请点击 → <a href=\"//rank.chinaz.com/wordsindex.aspx\" target=\"_blank\">关键词指数批量查询</a>\r\n                </p>\r\n\r\n            </form>\r\n        </div>\r\n        <script type=\"text/javascript\">\r\n            $(\"#btn-submit\").click(function () {\r\n                if ($(\"#txtKw\").val()) {\r\n                    location.href = \"/index/\" + $(\"#txtKw\").val() + \"/\";\r\n                } else {\r\n                    location.href = \"/\";\r\n                }\r\n                return false;\r\n                //$(\"#keyword\").val($(\"txtKw\").val());\r\n            });\r\n            $(\".SeaBtnCut\").bind(\"click\",\r\n                function () {\r\n                    var kw = $(\"#txtKw\").val();\r\n                    if (kw) {\r\n                        kw = kw.replace(/，/g, \",\");\r\n                        if (kw.indexOf(',') > -1) {\r\n                            kw = kw.substring(0, kw.indexOf(','));\r\n                            if (kw) {\r\n                                kw += \"/\";\r\n                            }\r\n                        }\r\n                        $(this).attr(\"href\", $(this).attr(\"href\") + kw);\r\n                    }\r\n                })\r\n        </script>\r\n        <!--PingSearch-end-->\r\n    </div>\r\n    \r\n<div class=\"wrapper02 auto mt10\">\r\n    <!--zs-wrap-begin-->\r\n    <div class=\"zs-wrap\" id=\"indexHeader\">\r\n        <div class=\"zs-title bor-b1s03 clearfix\">\r\n            <strong class=\"fz18 fwnone col-gray03 fl\">近7天的指数概况</strong>\r\n            <a href=\"http://my.chinaz.com/login/Index?returnurl=http://my.chinaz.com/ChinazToolSeo/IndexMonitor/addKeyword\" target=\"_blank\" class=\"fr zs-btn01 trans\" id=\"addkw\">添加关键词</a>\r\n        </div>\r\n        <ul class=\"zs-nodule bg-3f9 bor-b1s clearfix tin6\">\r\n            <li class=\"nod-li \">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span>关键词</span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a>全网指数</a></span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a href=\"javascript:void(0);\" data-m=\"baidu\" module=\"baidu-pc\">PC搜索指数</a></span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a href=\"javascript:void(0);\" data-m=\"baidu\" module=\"baidu-mobile\">移动搜索指数</a></span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a href=\"javascript:void(0);\" data-m=\"haosou\">360指数</a></span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a href=\"javascript:void(0);\" data-m=\"sogou\" module=\"sogou-pc\">搜狗PC指数</a></span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a href=\"javascript:void(0);\" data-m=\"sogou\" module=\"sogou-mobile\">搜狗移动指数</a></span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a href=\"javascript:void(0);\" data-m=\"weixin\">微信指数</a></span>\r\n                </div>\r\n            </li>\r\n            <li class=\"nod-li\">\r\n                <div class=\"h24 lh24 ptb5\">\r\n                    <span><a href=\"javascript:void(0);\">神马指数</a></span>\r\n                </div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n    <div id=\"baidu-module\"></div>\r\n    <div id=\"haosou-module\"></div>\r\n    <div id=\"sogou-module\"></div>\r\n    <div id=\"weixin-module\"></div>\r\n</div>\r\n<script type=\"x/template\" id=\"tmpl-indexHeader\">\r\n    <ul class=\"zs-nodule bor-b1s clearfix\">\r\n        <li class=\"nod-li\">\r\n            <div class=\"clearfix qn-key\">\r\n                <strong class=\"lh30\">{{kw}}</strong>\r\n            </div>\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml all change}}\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml pc pc_change}}\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml mobile mobile_change}}\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml haosou haosou_change}}\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml sogou_pc sogou_pc_change}}\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml sogou_mobile sogou_mobile_change}}\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml weixin weixin_change}}\r\n        </li>\r\n        <li class=\"nod-li\">\r\n            {{indexHtml shenma 0}}\r\n        </li>\r\n    </ul>\r\n</script>\r\n<script type=\"x/template\" id=\"tmpl-indexVal\">\r\n    {{#if val}}\r\n    <div class=\"clearfix {{cls}}\">\r\n        <div class=\"clearfix\"><strong class=\"fz20 tot\">{{formatVal val}}</strong></div>\r\n        <div class=\"extent\"><span class=\"zs-dec\">{{formatVal range}}</span></div>\r\n    </div>\r\n    {{else}}\r\n    <div class=\"clearfix zs-col01 quota-nat\">\r\n        <div class=\"clearfix\"><strong class=\"fz20 tot col-gray\">未收录</strong></div>\r\n        <div class='extent'> <span class='col-gray'>-</span></div>\r\n    </div>\r\n    {{/if}}\r\n</script>\r\n<script type=\"x/template\" id=\"tmpl-module1\">\r\n    <div class=\"zs-title bor-b1s03 clearfix\" name=\"{{id}}\">\r\n        <div class=\"fl chart-tabsort\">\r\n            <a href=\"javascript:\" class=\"tab-sort active\" v=\"{{id}}-all\" data-type=\"all\" t=\"{{name}}整体搜索趋势\">{{name}}整体搜索趋势</a>\r\n            <a href=\"javascript:\" class=\"tab-sort\" v=\"{{id}}-pc\" data-type=\"pc\" t=\"{{name}}PC整体搜索趋势\">{{name}}PC整体搜索趋势</a>\r\n            <a href=\"javascript:\" class=\"tab-sort\" v=\"{{id}}-mobile\" data-type=\"mobile\" t=\"{{name}}移动整体搜索趋势\">{{name}}移动整体搜索趋势</a>\r\n        </div>\r\n        <div class=\"fr dp-time pl10\" name=\"{{id}}-type\">\r\n            <a href=\"javascript:\" rel=\"7\" v=\"{{id}}\">7天</a>\r\n            <a href=\"javascript:\" class=\"on\" rel=\"30\" v=\"{{id}}\">30天</a>\r\n        </div>\r\n        {{#if apiUrl}}\r\n        <a href=\"{{apiUrl}}\" target=\"_blank\" class=\"getapi ml5 fr\">获取API</a>\r\n        {{/if}}\r\n    </div>\r\n    <div class=\"zs-dataPart\">\r\n        <div class=\"dp-trend mt10 chart\" style=\"height:280px;\" id=\"{{id}}-chart\"></div>\r\n        <div class=\"h40 lh40 tc d-time\" name=\"d-time\">\r\n            <span class=\"col-blue02 pl10 fz18\">{{formatDate startDay}}-{{formatDate endDay}}</span>\r\n        </div>\r\n        <ul class=\"week-tit all-week\">\r\n            <li>星期日</li>\r\n            <li>星期一</li>\r\n            <li>星期二</li>\r\n            <li>星期三</li>\r\n            <li>星期四</li>\r\n            <li>星期五</li>\r\n            <li class=\"last\">星期六</li>\r\n        </ul>\r\n        {{#each this}}\r\n        <div class=\"dp-table\" id=\"{{../id}}-all\">\r\n            {{indexBody ../id this all ''}}\r\n        </div>\r\n        <div class=\"dp-table autohide\" id=\"{{../id}}-pc\">\r\n            {{indexBody ../id this pc 'autohide'}}\r\n        </div>\r\n        <div class=\"dp-table autohide\" id=\"{{../id}}-mobile\">\r\n            {{indexBody ../id this mobile 'autohide'}}\r\n        </div>\r\n        {{/each}}\r\n    </div>\r\n</script>\r\n<script type=\"x/template\" id=\"tmpl-indexBody\">\r\n    <ul class=\"clearfix autohide\" name=\"{{id}}7\">\r\n        {{#each data}}\r\n        {{#if-day-seven @index}}\r\n        <li>\r\n            <div class=\"amount\">\r\n                <strong class=\"{{indexCls @index ../data}}\">{{formatVal this}}</strong>\r\n            </div>\r\n            <div class=\"date\">\r\n                <em class=\"fz12 fwnone {{indexCls @index ../data}} fl\">\r\n                    {{indexChange @index ../data}}\r\n                </em>\r\n                <div class=\"date\">\r\n                    <span>{{getDate @index ../startDay}}</span>\r\n                </div>\r\n            </div>\r\n        </li>\r\n        {{/if-day-seven}}\r\n        {{/each}}\r\n    </ul>\r\n    <ul class=\"clearfix {{cls}}\" name=\"{{id}}30\">\r\n        {{default-before startDay}}\r\n        {{#each data}}\r\n        <li class=\"{{lilast @index ../startDay 0}}\">\r\n            <div class=\"amount\">\r\n                <strong class=\"{{indexCls @index ../data}}\">{{formatVal this}}</strong>\r\n            </div>\r\n            <div class=\"date\">\r\n                <em class=\"fz12 fwnone {{indexCls @index ../data}} fl\">\r\n                    {{indexChange @index ../data}}\r\n                </em>\r\n                <div class=\"date\">\r\n                    <span>{{getDate @index ../startDay}}</span>\r\n                </div>\r\n            </div>\r\n        </li>\r\n        {{/each}}\r\n        {{default-after startDay endDay}}\r\n    </ul>\r\n</script>\r\n<script type=\"x/template\" id=\"tmpl-module2\">\r\n    <div class=\"zs-title bor-b1s03 clearfix\">\r\n        <div class=\"fl chart-tabsort\">\r\n            <a href=\"javascript:\" class=\"tab-sort active\" v=\"{{id}}-all\" data-type=\"all\" t=\"{{name}}搜索趋势\">{{name}}搜索趋势</a>\r\n        </div>\r\n        <div class=\"fr dp-time pl10\">\r\n            <a href=\"javascript:\" rel=\"7\" v=\"{{id}}\">7天</a>\r\n            <a href=\"javascript:\" class=\"on\" rel=\"30\" v=\"{{id}}\">30天</a>\r\n        </div>\r\n        {{#if apiUrl}}\r\n        <a href=\"{{apiUrl}}\" target=\"_blank\" class=\"getapi ml5 fr\">获取API</a>\r\n        {{/if}}\r\n    </div>\r\n    <div class=\"zs-dataPart\">\r\n        <div class=\"dp-trend mt10 chart\" style=\"height:280px;\" id=\"{{id}}-chart\"></div>\r\n        <div class=\"h40 lh40 tc\" name=\"d-time\">\r\n            <span class=\"col-blue02 pl10 fz18\">{{formatDate startDay}}-{{formatDate endDay}}</span>\r\n        </div>\r\n        <ul class=\"week-tit all-week\">\r\n            <li>星期日</li>\r\n            <li>星期一</li>\r\n            <li>星期二</li>\r\n            <li>星期三</li>\r\n            <li>星期四</li>\r\n            <li>星期五</li>\r\n            <li class=\"last\">星期六</li>\r\n        </ul>\r\n        <div class=\"dp-table\" id=\"{{id}}-all\">\r\n            {{#each this}}\r\n            {{#if update}}\r\n            {{indexBody ../id this all ''}}\r\n            {{/if}}\r\n            {{/each}}\r\n        </div>\r\n    </div>\r\n</script>\r\n<script type=\"x/template\" id=\"tmpl-module3\">\r\n    <div class=\"zs-dataPart\">\r\n        <div class=\"zs-title  col-gray clearfix\">\r\n            <div class=\"fl chart-tabsort\">\r\n                <a href=\"javascript:\" class=\"tab-sort\" v=\"all\" data-type=\"all\" t=\"{{this}}指数未收录\">{{this}}指数未收录</a>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</script>\r\n<script type=\"text/javascript\">\r\n    var INDEX_DATA = eval({\"index\":[{\"kw\":\"徐州网站建设\",\"all\":46,\"change\":54,\"pc\":46,\"pc_change\":-8,\"mobile\":0,\"mobile_change\":0,\"haosou\":0,\"haosou_change\":0,\"sogou_pc\":0,\"sogou_pc_change\":0,\"sogou_mobile\":0,\"sogou_mobile_change\":0,\"weixin\":0,\"weixin_change\":0,\"shenma\":null}],\"baidu\":[{\"kw\":\"徐州网站建设\",\"update\":\"20190829\",\"type\":0,\"all\":{\"index\":[68,68,59,0,0,59,61,0,63,64,66,66,0,63,63,59,70,66,0,61,61,0,68,68,64,63,63,0,63,0],\"avg\":46,\"change\":-8},\"pc\":{\"index\":[68,68,59,0,0,59,61,0,63,64,66,66,0,63,63,59,70,66,0,61,61,0,68,68,64,63,63,0,63,0],\"avg\":46,\"change\":-8},\"mobile\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0}}],\"haosou\":[{\"kw\":\"徐州网站建设\",\"update\":\"20180212\",\"type\":0,\"all\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0},\"pc\":{\"index\":null,\"avg\":null,\"change\":null},\"mobile\":{\"index\":null,\"avg\":null,\"change\":null}}],\"sogou\":[{\"kw\":\"徐州网站建设\",\"update\":\"20190831\",\"type\":-1,\"all\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0},\"pc\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0},\"mobile\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0}}],\"weixin\":[{\"kw\":\"徐州网站建设\",\"update\":\"20190831\",\"type\":-1,\"all\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0},\"pc\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0},\"mobile\":{\"index\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"avg\":0,\"change\":0}}]});\r\n</script>\r\n\r\n    <input name=\"__RequestVerificationToken\" type=\"hidden\" value=\"lTRrr1CqhY4wZOXYXs7B_VcPvw_knt6fpHXCuLan_GLeRzep1G9GWWXWePEIR8-DHqewqGnS4wJxFFZBbFBT3kyup4ejBFfJ3cKbmTAJXxA1\" />\r\n    <!--footer-public-begin-->\r\n    <div class=\"wrapper mt10\">\r\n        <div id=\"centerTxt\"></div>\r\n        <div class=\"ToolsWrap\" id=\"centerImg\"></div>\r\n        <div class=\"ToolAbout wrapper03\">\r\n            <div class=\"clearfix\">\r\n                <h4 class=\"HeadH4 YaHei fz16 col-blue02 fwnone fl\">工具简介</h4>\r\n                <div class=\"fr fz14\" id=\"toolsIntro\">\r\n\r\n                </div>\r\n            </div>\r\n            <div class=\"col-gray01 ToolAbCont\">\r\n                <p>站长全网指数查询是以各大搜索引擎海量网民搜索行为数据为基础的数据分享平台。在这里，你可以研究关键词在各大搜索引擎的趋势、洞察网民需求变化、监测媒体舆情趋势、定位数字消费者特征；还可以从行业的角度，分析市场特点。</p>\r\n            </div>\r\n        </div>\r\n    </div>\r\n\r\n    <!--siteBar-begin-->\r\n    <div class=\"wrapper mt10 bor-b1s06 clearfix\">\r\n        <div class=\"ToFooter fl w24-0\">\r\n            <a href=\"javascript:\" class=\"ToCurt\">SEO相关</a>\r\n            <a href=\"javascript:\">其他工具相关</a>\r\n        </div>\r\n        <div class=\"fr lh43 pr10 new_fea\">\r\n            <a href=\"//icp.chinaz.com/\" target=\"_blank\">网站备案</a>\r\n            <a href=\"//mobile.chinaz.com/\" target=\"_blank\">Wap适配</a>\r\n            <a href=\"//tool.chinaz.com/speedcom.aspx\" target=\"_blank\">网站测速PK</a>\r\n            <a href=\"//del.chinaz.com/\" target=\"_blank\">过期域名查询</a>\r\n            <a href=\"//tool.chinaz.com/keywordsarea/\" target=\"_blank\">关键词异地排名</a>\r\n        </div>\r\n    </div>\r\n    <div class=\"GMFocusBox auto\">\r\n        <div>\r\n            <div class=\"tFull\">\r\n                <div class=\"GMFimglist02 pr\">\r\n                    <div class=\"Fotline\"></div>\r\n                    <ul class=\"siteBar wrapper clearfix\">\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">域名类</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//whois.chinaz.com\" target=\"_blank\">WHOIS查询</a>\r\n                                <a href=\"//tool.chinaz.com/dns/\" target=\"_blank\">DNS查询</a>\r\n                                <a href=\"//del.chinaz.com\" target=\"_blank\">过期域名查询</a>\r\n                                <a href=\"//tool.chinaz.com/nslookup/\" target=\"_blank\">NsLookup查询</a>\r\n                                <a href=\"//tool.chinaz.com/DomainDel/\" target=\"_blank\">域名删除时间</a>\r\n                                <a href=\"//icp.chinaz.com\" target=\"_blank\">备案查询</a>\r\n                                <a href=\"//del.chinaz.com/type\" target=\"_blank\">删除域名归档</a>\r\n                                <a href=\"//icp.chinaz.com/searchs\" target=\"_blank\">备案批量查询</a>\r\n                            </p>\r\n                        </li>\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">IP类</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//ip.chinaz.com\" target=\"_blank\">IP 查询</a>\r\n                                <a href=\"//ip.chinaz.com/ipbatch\" target=\"_blank\">IP 批量</a>\r\n                                <a href=\"//tool.chinaz.com/Same/\" target=\"_blank\">同IP网站查询</a>\r\n                                <a href=\"//tool.chinaz.com/ipwhois/\" target=\"_blank\">IP WHOIS查询</a>\r\n                                <a href=\"//tool.chinaz.com/port/\" target=\"_blank\">端口扫描</a>\r\n                            </p>\r\n                        </li>\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">百度相关</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//tool.chinaz.com/keywords\" target=\"_blank\">关键词排名</a>\r\n                                <a href=\"//tool.chinaz.com/baidu/words.aspx\" target=\"_blank\">关键词挖掘</a>\r\n                                <a href=\"//outlink.chinaz.com/\" target=\"_blank\">反链查询</a>\r\n                                <a href=\"//rank.chinaz.com\" target=\"_blank\">权重查询</a>\r\n                                <a href=\"//tool.chinaz.com/baidu/\" target=\"_blank\">收录查询</a>\r\n                                <a href=\"//tool.chinaz.com/baidu/entry\" target=\"_blank\">收录率查询</a>\r\n                                <a href=\"//tool.chinaz.com/kwevaluate\" target=\"_blank\">关键词优化分析</a>\r\n                                <a href=\"//tool.chinaz.com/baidu/metadig.aspx\" target=\"_blank\">Meta信息挖掘</a>\r\n                            </p>\r\n                        </li>\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">测速/监控</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//ping.chinaz.com\" target=\"_blank\">PING检测</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/webcheck.aspx\" target=\"_blank\">网站被黑检测</a>\r\n                                <a href=\"//tool.chinaz.com/speedtest.aspx\" target=\"_blank\">国内网站测速</a>\r\n                                <a href=\"//tool.chinaz.com/history/\" target=\"_blank\">网站历史记录</a>\r\n                                <a href=\"//tool.chinaz.com/speedworld.aspx\" target=\"_blank\">海外网站测速</a>\r\n                                <a href=\"//tool.chinaz.com/history/\" target=\"_blank\">SEO历史记录</a>\r\n                                <a href=\"//tool.chinaz.com/speedcom.aspx\" target=\"_blank\">国内网速对比</a>\r\n                                <a href=\"//alexa.chinaz.com/alexa_history.aspx\" target=\"_blank\">ALexa历史报告</a>\r\n                            </p>\r\n                        </li>\r\n\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">网页相关</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//tool.chinaz.com/webdetect/\" target=\"_blank\">网页检测</a>\r\n                                <a href=\"//tool.chinaz.com/webscan\" target=\"_blank\">网站安全检测</a>\r\n                                <a href=\"//tool.chinaz.com/Links/\" target=\"_blank\">死链检测</a>\r\n                                <a href=\"//tool.chinaz.com/Gzips/\" target=\"_blank\">网站GZIP压缩</a>\r\n                                <a href=\"//tool.chinaz.com/pagestatus/\" target=\"_blank\">网页状态检测</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/Density.aspx\" target=\"_blank\">关键词密度分析</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/MetaCheck.aspx\" target=\"_blank\">META信息查询</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/PageCode.aspx\" target=\"_blank\">查看网页源代码</a>\r\n                            </p>\r\n                        </li>\r\n                    </ul>\r\n                </div>\r\n            </div>\r\n        </div>\r\n\r\n    </div>\r\n    <div class=\"GMFocusBox auto autohide\">\r\n        <div>\r\n            <div class=\"tFull\">\r\n                <div class=\"GMFimglist02 pr\">\r\n                    <div class=\"Fotline\"></div>\r\n                    <ul class=\"siteBar wrapper clearfix\">\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">配色/在线汉字</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//tool.chinaz.com/Tools/cj\" target=\"_blank\">中日传统色彩</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/pinyindictionary.aspx\" target=\"_blank\">拼音字典</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/img\" target=\"_blank\">传图识色</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/word_spell.aspx\" target=\"_blank\">汉字拼音</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/web\" target=\"_blank\">WEB安全色</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/lowercase-uppercase.aspx\" target=\"_blank\">英文大小写</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/use\" target=\"_blank\">网页常用色彩</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/gb_big.aspx\" target=\"_blank\">繁/简/火星文</a>\r\n                            </p>\r\n                        </li>\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">WEB相关</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//tool.chinaz.com/htmlcheck.aspx\" target=\"_blank\">Html标签检测</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/httptest.aspx\" target=\"_blank\">Http接口测试</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/htmlchar.aspx\" target=\"_blank\">Html特殊符号</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/regexgenerate\" target=\"_blank\">正则表达式生成</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/cssdesigner.aspx\" target=\"_blank\">Css在线编辑</a>\r\n                                <a href=\"//tool.chinaz.com/webscan\" target=\"_blank\">网站安全检测</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/pagecode.aspx\" target=\"_blank\">查看网页源代码</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/wordcounter\" target=\"_blank\">在线字符统计</a>\r\n                            </p>\r\n                        </li>\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">加密解密</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//tool.chinaz.com/Tools/md5.aspx\" target=\"_blank\">MD5加密</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/jscodeconfusion.aspx\" target=\"_blank\">Js代码混淆</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/escape.aspx\" target=\"_blank\">Escape加/解密</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/jsformat.aspx\" target=\"_blank\">Js/Html格式化</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/urlcrypt.aspx\" target=\"_blank\">Url16进制</a>\r\n                                <a href=\"//tool.chinaz.com/js.aspx\" target=\"_blank\">Js混淆压缩</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/thunder_flashget.aspx\" target=\"_blank\">Url加/解密</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/textencrypt.aspx\" target=\"_blank\">文字加/解密</a>\r\n                            </p>\r\n                        </li>\r\n                        <li class=\"fl bor-r1s\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">单位换算</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//tool.chinaz.com/Tools/angle\" target=\"_blank\">角度换算</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/time\" target=\"_blank\">时间换算</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/heat\" target=\"_blank\">热量换算</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/length\" target=\"_blank\">长度换算</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/area\" target=\"_blank\">面积换算</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/calculator\" target=\"_blank\">计算器</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/datastore\" target=\"_blank\">数据存储</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/subnetmask\" target=\"_blank\">子网掩码</a>\r\n                            </p>\r\n                        </li>\r\n\r\n                        <li class=\"fl\">\r\n                            <h5 class=\"fz14 fwnone col-blue02 pb5\">编码转换</h5>\r\n                            <p class=\"plist\">\r\n                                <a href=\"//tool.chinaz.com/Tools/unicode.aspx\" target=\"_blank\">Unicode</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/html_ubb.aspx\" target=\"_blank\">Html/UBB</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/unixtime.aspx\" target=\"_blank\">Unix时间戳</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/urlencode.aspx\" target=\"_blank\">UrlEncode</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/native_ascii.aspx\" target=\"_blank\">NATIVE/ASCII</a>\r\n                                <a href=\"//tool.chinaz.com/qrcode\" target=\"_blank\">二维码生成</a>\r\n                                <a href=\"//tool.chinaz.com/Tools/utf-8.aspx\" target=\"_blank\">UTF-8编码</a>\r\n                                <a href=\"//tool.chinaz.com/tools/html_js.aspx\" target=\"_blank\">HTML/JS转换</a>\r\n                            </p>\r\n                        </li>\r\n                    </ul>\r\n                </div>\r\n            </div>\r\n        </div>\r\n\r\n    </div>\r\n    <!--siteBar-end-->\r\n    <div class=\"wrapper mt10\">\r\n        <div class=\"fotatxtd auto\" id=\"bottomImg\"></div>\r\n    </div>\r\n    <!--ToolFooter-begin-->\r\n    <div class=\"puw100 h80 bor-t1s mt10 bg-white\">\r\n        <div class=\"ToolFooter\">\r\n\r\n            <p class=\"linkbtn\">\r\n                <a href=\"http://www.chinaz.com/aboutus/index.html\" target=\"_blank\">关于站长之家</a> | <a href=\"http://ww.chinaz.com/aboutus/contact.php\" target=\"_blank\">联系我们 </a> | <a href=\"http://www.chinaz.com/aboutus/ad.html\" target=\"_blank\">广告服务</a> | <a href=\"http://www.chinaz.com/aboutus/link.html\" target=\"_blank\">友情链接</a> | <a href=\"http://www.chinaz.com/aboutus/events.html\" target=\"_blank\">网站动态</a> | <a href=\"http://www.chinaz.com/aboutus/announce.html\" target=\"_blank\">版权声明</a> | <a href=\"http://www.chinaz.com/aboutus/join.html\" target=\"_blank\">人才招聘</a> | <a href=\"http://www.chinaz.com/aboutus/help.html\" target=\"_blank\">帮助</a>\r\n            </p>\r\n            <p class=\"info\">\r\n                <span>© CopyRight 2002-2019, CHINAZ.COM, Inc.All Rights Reserved.</span><span>闽ICP备08105208号</span><span>增值电信业务经营许可证闽B2-20120007号</span><a href=\"http://www.wy.cn\" rel=\"nofollow\" target=\"_blank\" class=\"col-gray02\">服务器资源由唯一网络赞助</a><span class=\"col-gray02 ml10\">亿速云提供<a href=\"http://www.yisu.com/\" target=\"_blank\" class=\"col-blue03\">云服务器</a>支持</span>\r\n            </p>\r\n        </div>\r\n    </div>\r\n    <!--ToolFooter-end-->\r\n    <!--footer-public-end-->\r\n    <div id=\"ToolBox\">\r\n        <div id=\"xhead\"></div>\r\n        <ul id=\"xlist\"></ul>\r\n        <div id=\"xfoot\"></div>\r\n    </div>\r\n    <script src=\"//stats.chinaz.com/gj_g/rank_a.js\" type=\"text/javascript\"></script>\r\n    <script type=\"text/javascript\" src=\"//my.chinaz.com/js/uc.js\" charset=\"utf-8\"></script>\r\n    <div class=\"TFloat-item\" id=\"toTop\">\r\n        <a href=\"javascript:\" id=\"TFloat\" title=\"回到顶部\" style=\"display: none;\"></a> <a href=\"//tool.chinaz.com/contact\" class=\"feedback\" target=\"_blank\"></a> <a href=\"javascript:\" class=\"Record\" id=\"record\"></a>\r\n        <div class=\"Record-show \" id=\"RecordShow\" style=\"display: none;\">\r\n            <div class=\"Tgroup\">\r\n                <a href=\"//seo.chinaz.com/\" target=\"_blank\">SEO查询</a>\r\n                <a href=\"//icp.chinaz.com/\" target=\"_blank\">备案查询</a>\r\n                <a href=\"//ip.chinaz.com/\" target=\"_blank\">IP查询</a>\r\n                <a href=\"//tool.chinaz.com/kws/\" target=\"_blank\">关键词查询</a>\r\n                <a href=\"//link.chinaz.com/\" target=\"_blank\">友情链接</a>\r\n                <a href=\"//tool.chinaz.com/map.aspx\" class=\"col-hint\" target=\"_blank\">更多工具</a>\r\n            </div>\r\n            <div class=\"arr\"></div>\r\n        </div>\r\n    </div>\r\n    <div class=\"autohide\">\r\n        <script src='//s11.cnzz.com/stat.php?id=5082706&web_id=5082706' language='JavaScript' charset='gb2312' type=\"text/javascript\"></script>\r\n    </div>\r\n</body>\r\n</html>\r\n";
            //var index1 = html.IndexOf("eval(", StringComparison.Ordinal);
            //var index1Value = html.Substring(index1);
            //var index2 = index1Value.IndexOf(";", StringComparison.Ordinal);
            //var index2Value = index1Value.Substring(5, index2-6);


            //const string keyWordUrl = "http://apis.5118.com/keyword/baidupc";
            //var dict = new Dictionary<string, string>();
            //dict.Add("url", "www.wstx.com.cn");
            //var html = HttpHelper.HttpPost(keyWordUrl, dict, "DFD6E050095A401A82771DC38DDC3273", "application/x-www-form-urlencoded");
            ////var html = "";

            //Console.WriteLine(html);

            //for (int i = 0; i < 5; i++)
            //{
            //    Task.Run(() =>
            //    {
            //        var keyWordUrl = $"https://api.vleader.net.cn/api/Seo/KeyWordPrice?keyword=%E7%BD%91%E7%AB%99%E5%BB%BA%E8%AE%BE";
            //        var value = HttpHelper.HttpGet(keyWordUrl, null, "application/json, text/javascript");
            //        Console.WriteLine(value);
            //    });
            //}

            //var url = "https://www.baidu.com/link?url=kXhd8DGGmIJ_oCDHhfaY0S9LAKeTkXOpSPfC5-FJfKlGe2DdG56rTCWgHUHSffeD&wd=&eqid=a96eb696000032fc000000055e056eca";
            //var html = HttpHelper.HttpGet(url);
            //Console.WriteLine(html);

            #endregion

            #region 测试代码 3

            //var value = RefererService.GetKeyWord("dd2fcaa200000b440000000255bb2d70");
            //Console.WriteLine(value);
            //var dictionary = new Dictionary<string, object>
            //{
            //    {"openId", "od5Fd6tf31peVxTxdVCY_vrgyrK4"}
            //};
            //var url = "http://192.168.11.5:8070/user/getBusinessByOpenId";

            //Stopwatch st = new Stopwatch();
            //st.Start();
            //var html = HttpHelper.HttpPostAsync(url, dictionary.ToJson()).Result;
            //st.Stop();

            //Console.WriteLine(st.ElapsedMilliseconds);
            //Console.WriteLine(html);

            #endregion

            #region 测试代码 4

            //var url = "http://www.xzznkj.cn/app/wxxcxapi.asmx/GetChannel?key=case";

            //for (int i = 0; i < 100; i++)
            //{
            //    Thread.Sleep(300);
            //    var html = HttpHelper.HttpGet(url);
            //    Console.WriteLine($"[{i}]");
            //}

            #endregion

            #region mongodb

            //var db = MongoDbClient.GetInstance("mongodb://admin@121.196.23.49:27017/?authSource=admin", "qihuitui-crm");
            //var collection = db.GetCollection<KeyWordArticleModel>("ArticleTable_1");
            //var model1 = new KeyWordArticleModel();
            //var model2 = new KeyWordArticleModel();
            //var document = new BsonDocument
            //{
            //    { "name", "测试数据1" },
            //    { "type", "大类" },
            //    { "number", 5 },
            //    { "info", new BsonDocument
            //    {
            //        { "x", 111 },
            //        { "y", 222 }
            //    }}
            //};
            //FilterDefinitionBuilder<KeyWordArticleModel> builderFilter = Builders<KeyWordArticleModel>.Filter;
            //ProjectionDefinitionBuilder<KeyWordArticleModel> builderProjection = Builders<KeyWordArticleModel>.Projection;
            //ProjectionDefinition<KeyWordArticleModel> projection = builderProjection.Include("_id").Include("title");
            //var list = db.Get<KeyWordArticleModel>("crm_article", builderFilter.Empty, projection);

            //var filter = Builders<KeyWordArticleModel>.Filter.Eq((model => model.KeyWordId), 1);
            //var listview = collection.Find(filter).ToList();
            //db.InsertOne("KeyWordArticle_1", document);

            //var list2 = new WriteModel<KeyWordArticleModel>[] { };
            //var insertList = list2.ToList();
            //insertList.Add(new InsertOneModel<KeyWordArticleModel>(model1));
            //insertList.Add(new InsertOneModel<KeyWordArticleModel>(model2));

            //db.BulkInsert("KeyWordArticle_1", insertList.ToArray());

            #endregion

            #region 伪静态测试

            //const string login = "https://pay.xzch.cn/wehospital/microsite/login/dologin";
            //var values = new Dictionary<string, string>
            //{
            //    { "phone_no", "18205213027" },
            //    { "password", "1dadc858275fc8347ba2dcfae5b0dea4" }
            //};
            //var value = HttpHelper.HttpPost(login, values, "application/x-www-form-urlencoded");
            //Console.WriteLine(value);


            //const string url = "http://tool.chinaz.com/kwevaluate?kw=%E5%9E%83%E5%9C%BE%E6%A1%B6";
            //var values = HttpHelper.HttpGet(url);
            //Console.WriteLine(values);

            //const string url = "http://api.qihuitui.com.cn/access-task/getRandomKeyword";
            //var values = HttpHelper.HttpGet(url);
            //Console.WriteLine(values);


            //var ss = CommonBase.RandomNumber(2000, 8000);
            //Console.WriteLine(ss);

            //var str = "中国说：美国将成立两党委员会 研究改变最高法院规模等话题。美国说：美国将成立两党委员会 研究改变最高法院规模等话题。日本说：美国将成立两党委员会 研究改变最高法院规模等话题。";

            //var list = str.Split('。', true);

            //Console.WriteLine(list);

            #endregion

            #region 企业微信相关

            //var authUrl = "http://www.naipan.com/open/weiyuanchuang/towei.html";
            //var authUserName = "1824975513@qq.com";
            //var authPassWord = "TEW3ARDDLG9BVM26GJSHMDUDPW7GUW1A";
            //var content = "新版奶盘SEO伪原创采用独有的分词引擎以及自创同义词库，模拟百度等中文切词进行伪原创，生成后的伪原创文章更准确更贴近百度等搜索引擎收录。";
            //var dic = new Dictionary<string, string>();
            //dic.Add("regname", authUserName);
            //dic.Add("regsn", authPassWord);
            //dic.Add("content", content);

            //var value = HttpHelper.HttpPost(authUrl, dic, "application/x-www-form-urlencoded");

            //Console.WriteLine(value);

            #endregion

            #region 测试

            //var http = HttpHelper.HttpGet("http://www.11tu.cc/forum-55-1.html");
            //var http = HttpHelper.HttpGet("https://index.baidu.com/api/SearchApi/index?area=0&word=[[%7B%22name%22:%22%E5%88%AB%E5%A2%85%E8%A3%85%E4%BF%AE%E4%BB%B7%E6%A0%BC%22,%22wordType%22:1%7D]]&days=30");

            //var url = $"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxfb2b196b3146617e&secret=adc04caaea400180ad3b4aea36950c6c";
            //var token = HttpHelper.HttpGet(url);
            //Console.WriteLine(token);

            // var json = @"{""surveyId"":48131,""organizationName"":""徐州网商天下科技集团有限公司"",""customerCompanyName"":""山东巨能起重机械制造有限公司"",""recordUrl"":""https://private-ikcrm-call-robot-files.ikcrm.com/recordffe6fa97-31d3-482a-b6b0-6f9e2a683817.wav"",""groupId"":724474,""labelType"":""D"",""startedAt"":""2022-01-19 09:40:54"",""focus"":[],""userName"":""徐彪"",""userId"":12884612,""customerName"":""高**"",""content"":[{ ""speaker"":""Robot"",""name"":""Robot"",""script"":""【开场白】喂，您好（停顿2s）您好，我这边是专业做互联网营销推广的，能快速为您企业做五合一建站，有效获取且转化更多客户资源，您这边有兴趣了解一下吗？  \n\n\n"",""timestamp"":1642556475374}],""organizationId"":11648016,""duration"":10,""jobId"":11772842934,""customerPhone"":""15163837678"",""groupName"":""测试"",""surveyName"":""营销推广 10号录音"",""customerId"":9351066419}";
            // var value = HttpHelper.HttpGet("http://61.160.6.128:1288/login.aspx?username=zzxadmin&password=12345678");
            // Console.WriteLine(value);

            for (var i = 0; i < 100; i++)
            {
                var html = HttpHelper.HttpGet("http://www.xzhhkjjg.com/");
                Thread.Sleep(1000);
                Console.WriteLine(i);
            }

            #endregion

            #region 点击任意键退出 ^ . ^

            {
                Console.WriteLine("测试已完成");
                Console.ReadLine();
            }

            #endregion
        }
    }

    #region 定时器

    public sealed class MyTimer
    {
        private static readonly Timer Timer = new Timer();

        public void Start()
        {
            Timer.AutoReset = true;
            Timer.Enabled = true;
            Timer.Interval = 800;
            Timer.Elapsed += Timer_Elapsed;
            Timer.Start();
            
            Console.WriteLine("定时器开始");
        }

        public void Stop()
        {
            Timer.Stop();
            Timer.Close();
            Timer.Enabled = false;
            Timer.Dispose();
            Console.WriteLine("定时器停止");
        }

        public void Timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            Console.WriteLine("响应事件");
        }
    }

    #endregion

    #region 模型扩展

    public static class LinqTest
    {
        public static List<T> LinqS<T>(this List<T> list, Func<T, bool> func)
        {
            var result = new List<T>();
            foreach (var t in list)
                if (func.Invoke(t))
                    result.Add(t);
            return result;
        }

        public static IEnumerable<T> LinqYield<T>(this IEnumerable<T> list, Func<T, bool> func)
        {
            //var result = new List<T>();
            foreach (var t in list)
                if (func.Invoke(t))
                    yield return t;
            //return result;
        }
    }

    #endregion

    #region 模型

    public class Users
    {
        [DataBaseHelper.XKey]
        [DataBaseHelper.XIdentityKey]
        public int Id { get; set; }

        public string UserName { get; set; }
        public string Password { get; set; }

        [DataBaseHelper.XNotMapped] public string UserPass { get; set; }
    }

    public class KeyWordArticleModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }

        public int UserId { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 关键词
        /// </summary>
        public string KeyWords { get; set; }

        /// <summary>
        /// 关键词Id
        /// </summary>
        public int KeyWordId { get; set; }

        /// <summary>
        /// 网站域名
        /// </summary>
        public string WebUrl { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string Author { get; set; }

        /// <summary>
        /// 点击数
        /// </summary>
        public int Click { get; set; }

        /// <summary>
        /// 启用标记
        /// </summary>
        public virtual bool EnabledMark { get; set; }

        /// <summary>
        /// 删除标记
        /// </summary>
        public virtual bool DeleteMark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime CreateTime { get; set; }

        /// <summary>
        /// 删除人
        /// </summary>
        public virtual string DeleteBy { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        public virtual DateTime? DeleteTime { get; set; }

        /// <summary>
        /// 分类标签
        /// </summary>
        public string Tagids { get; set; }

        /// <summary>
        /// 企业标签
        /// </summary>
        public string EnterpriseLabel { get; set; }
    }

    #endregion

    #region 全排列
    public class PermutationAndCombination<T>
    {
        /// <summary>
        ///     交换两个变量
        /// </summary>
        /// <param name="a">变量1</param>
        /// <param name="b">变量2</param>
        public static void Swap(ref T a, ref T b)
        {
            var temp = a;
            a = b;
            b = temp;
        }

        /// <summary>
        ///     递归算法求数组的组合(私有成员)
        /// </summary>
        /// <param name="list">返回的范型</param>
        /// <param name="t">所求数组</param>
        /// <param name="n">辅助变量</param>
        /// <param name="m">辅助变量</param>
        /// <param name="b">辅助数组</param>
        /// <param name="ms">辅助变量M</param>
        private static void GetCombination(ref List<T[]> list, T[] t, int n, int m, int[] b, int ms)
        {
            for (var i = n; i >= m; i--)
            {
                b[m - 1] = i - 1;
                if (m > 1)
                {
                    GetCombination(ref list, t, i - 1, m - 1, b, ms);
                }
                else
                {
                    if (list == null) list = new List<T[]>();
                    var temp = new T[ms];
                    for (var j = 0; j < b.Length; j++) temp[j] = t[b[j]];
                    list.Add(temp);
                }
            }
        }

        /// <summary>
        ///     递归算法求排列(私有成员)
        /// </summary>
        /// <param name="list">返回的列表</param>
        /// <param name="t">所求数组</param>
        /// <param name="startIndex">起始标号</param>
        /// <param name="endIndex">结束标号</param>
        private static void GetPermutation(ref List<T[]> list, T[] t, int startIndex, int endIndex)
        {
            if (startIndex == endIndex)
            {
                if (list == null) list = new List<T[]>();
                var temp = new T[t.Length];
                t.CopyTo(temp, 0);
                list.Add(temp);
            }
            else
            {
                for (var i = startIndex; i <= endIndex; i++)
                {
                    Swap(ref t[startIndex], ref t[i]);
                    GetPermutation(ref list, t, startIndex + 1, endIndex);
                    Swap(ref t[startIndex], ref t[i]);
                }
            }
        }

        /// <summary>
        ///     求从起始标号到结束标号的排列，其余元素不变
        /// </summary>
        /// <param name="t">所求数组</param>
        /// <param name="startIndex">起始标号</param>
        /// <param name="endIndex">结束标号</param>
        /// <returns>从起始标号到结束标号排列的范型</returns>
        public static List<T[]> GetPermutation(T[] t, int startIndex, int endIndex)
        {
            if (startIndex < 0 || endIndex > t.Length - 1) return null;
            var list = new List<T[]>();
            GetPermutation(ref list, t, startIndex, endIndex);
            return list;
        }

        /// <summary>
        ///     返回数组所有元素的全排列
        /// </summary>
        /// <param name="t">所求数组</param>
        /// <returns>全排列的范型</returns>
        public static List<T[]> GetPermutation(T[] t)
        {
            return GetPermutation(t, 0, t.Length - 1);
        }

        /// <summary>
        ///     求数组中n个元素的排列
        /// </summary>
        /// <param name="t">所求数组</param>
        /// <param name="n">元素个数</param>
        /// <returns>数组中n个元素的排列</returns>
        public static List<T[]> GetPermutation(T[] t, int n)
        {
            if (n > t.Length) return null;
            var list = new List<T[]>();
            var c = GetCombination(t, n);
            foreach (var t1 in c)
            {
                var l = new List<T[]>();
                GetPermutation(ref l, t1, 0, n - 1);
                list.AddRange(l);
            }

            return list;
        }


        /// <summary>
        ///     求数组中n个元素的组合
        /// </summary>
        /// <param name="t">所求数组</param>
        /// <param name="n">元素个数</param>
        /// <returns>数组中n个元素的组合的范型</returns>
        public static List<T[]> GetCombination(T[] t, int n)
        {
            if (t.Length < n) return null;
            var temp = new int[n];
            var list = new List<T[]>();
            GetCombination(ref list, t, t.Length, n, temp, n);
            return list;
        }
    }
    #endregion
}
